{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "334696f5",
   "metadata": {},
   "source": [
    "# **<font size=4 color=#BB3D00 face=微软雅黑>脉冲函数、阶跃函数和斜坡函数</font>**\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5a129839",
   "metadata": {},
   "source": [
    "## <font size=3  face=微软雅黑>**※Matlab案例**</font> "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8ce876b3",
   "metadata": {},
   "source": [
    "网址：https://ww2.mathworks.cn/help/signal/gs/impulse-step-and-ramp-functions.html   \n",
    "描述：本案例由4个示例构成：   \n",
    "### - <font size=3 color=DarkOrChid>示例1：脉冲函数</font>\n",
    "### - <font size=3 color=DarkOrChid>示例2：阶跃函数</font>\n",
    "### - <font size=3 color=DarkOrChid>示例3：斜坡函数</font>\n",
    "### - <font size=3 color=DarkOrChid>示例4：抛物线函数</font>"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6bc6dbdd",
   "metadata": {},
   "source": [
    "<font size=3 face=微软雅黑>**※Python案例**</font> "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "31583391",
   "metadata": {},
   "source": [
    "针对以上案例，采用Python语言实现。"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2b93c73c",
   "metadata": {},
   "source": [
    "### - <font size=3 color=DarkOrChid>示例1：脉冲函数</font>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "50ad7098",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAQzUlEQVR4nO3dbYwdV33H8e8Pm1Ql0AaIgeAHSIVLcKukDduQFlpCIdTJGxeplRIQoVEiK2qCqNQXWKKCF7wpRUUVIsGyqAVUFXl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RG1dadqbb6zL0N9UdfuP9Nub/b/gT4LvAXaP9LwcOLvrW+1Hm775439DtXqIfL2b+l8l8c/Tnixb3g/m7Ru4fvY6utX4s9RkDNwE3jd4HuHV0/EGWuatqLbzG6Msto2twP3AI+L2h27xMPz4DPA78dPRzcsMUX5OV+jIt1+QNzE/PPADcN3pdvZrXxaUVJKkRrU3pSFKzDHxJaoSBL0mNMPAlqREGviQ1wsCXpEYY+JLUiP8H3fIy1AE+xZwAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "def impulse_wave(x,c):     #在c处产生脉冲波\n",
    "     if x==c:\n",
    "          r=1.0\n",
    "     else:\n",
    "          r=0.0\n",
    "     return r\n",
    "\n",
    "x=np.linspace(-1,2,1000)\n",
    "y=np.array([impulse_wave(t,0.0) for t in x])\n",
    "plt.ylim(-0.2,1.2)\n",
    "plt.plot(x,y)\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a5708975",
   "metadata": {},
   "source": [
    "### - <font size=3 color=DarkOrChid>示例2：阶跃函数</font>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "d0f6d6d2",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAARkElEQVR4nO3df4xlZX3H8ffHXWks0qKyKu4PpXErbBtocYq0WsUiduGfrUmbgEYskWxIwWjSP9zERP/wn6pp0xjBzcZukKSRf0TdmsWtNbWkQcwuhl8rXZiilekSWbSht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HthpMC3XZBxTdU1WuO1Mp9dlqgK/TnCbhzHNAZsXbG8Cjk54zJN2ovMY93YVVXV09OeTSb7E/PTDagj8cX7Gq+I6jGHFcS58g1bV/iS3JDmnqqbtJl7Tck1WNE3XZIzbznR6XYY2pXMQ2JrkvCRnAFczf3uI1WSc21WcmeSs558D7wSWXLHQwDg/433AtaMVCJcCTz8/jbXKrHguSV49un0ISS5h/j31o95HOrlpuSYrmpZrMhrjSred6fa6tP6kusNPvN/F/L+GPwN+CBwYvf4aYP+iT70fYX71xUdaj3uJ83gF879M5tHRny9ffB7Mrxq5f/Q4vNrOY6mfMXADcMPoeYCbR/sfZJlVVavhMca53DS6BvcD9wC/13rMy5zHF4AngJ+P3ifvn+JrstK5TMs1eQvz0zMPAPeNHledzuvirRUkaSCGNqUjSYNl4EvSQBj4kjQQBr4kDYSBL0kDYeBL0kAY+JI0EP8HW54lI5AC8cEAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "def unitstep_wave(x,c):     #在c处产生阶跃信号\n",
    "     if x>=c:\n",
    "          r=1.0\n",
    "     else:\n",
    "          r=0.0\n",
    "     return r\n",
    "\n",
    "x=np.linspace(-1,2,1000)\n",
    "y=np.array([unitstep_wave(t,0.0) for t in x])\n",
    "plt.ylim(-0.2,1.2)\n",
    "plt.plot(x,y)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "711e0885",
   "metadata": {},
   "source": [
    "### - <font size=3 color=DarkOrChid>示例3：斜坡函数</font>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "2a8384f8",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAAOXRFWH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ZnmIRBLNchVtzaz93z4HLgbqfcZCCKL5Gi8Cro88A2EssO9v01gJptFjMbMekeVDMLMx1PxM7Y570tglyzlpVLKck0jGxpadCfa8hP2b6gB/4z2Fmn8NjwE7gKWR+3sBS+r81nsdNc++uCPs3PUcRxdq3kxmfeTPznWPg5pnjayIfBQl2nHU9zUGpgHTIp8b8EhkeyENPKsqET6iOJZbIudgBfAucHbYmRs4jqeB7UBF5OfkxiQ+J40dS7Kck3OpmZ4pAD6KfExqzvOipRVERNJEuk3piIikLRW+iEiaUOGLiKQJFb6ISJpQ4YuIpAkVvohImlDhi4ikif8HskoMwU28eqYAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "def ramp_wave(x,c):     #在c处产生斜坡\n",
    "     if x>=c:\n",
    "          r=x\n",
    "     else:\n",
    "          r=0.0\n",
    "     return r\n",
    "\n",
    "x=np.linspace(-1,2,1000)\n",
    "y=np.array([ramp_wave(t,0.0) for t in x])\n",
    "plt.ylim(-0.2,1.2)\n",
    "plt.plot(x,y)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "cd4165f0",
   "metadata": {},
   "source": [
    "### - <font size=3 color=DarkOrChid>示例4：抛物线函数</font>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "812658c7",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAbwUlEQVR4nO3de3hV9Z3v8fc3gXCXAAm3hBQQEFBAM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XA0+HXWsC+3IpMB/Y2s36tDgmCe5LuhyTCcD82OcjgO19/buSMWf47l7p7j3dlbsAqHL3andvAVbRMT1EKulxuooUl8j3eBnwM++wDsiN3ceRatLh5yUh7r4WOHiKJulyTBLZl7TgiU07E+hxyZjAT1ABUNNpuZbUm9fnQ9NVAN1NV+HAs2a2ITYdRapI5HucDscBEq/zL8ys3MyeMbOz+6e0wKXLMUlUWh2TU0w7E+hxSXYunX51qmke3P2km77ibSLOa/1+XWpA01V81N3rYvMXPWdmb8XOfMKWyPc4JY5DAhKpcyPwEXdvit1f8htgel8X1gfS5ZgkIq2OSQ/TzgR6XNIq8P0U0zwkqBaY1Gm5EKhLcpun7VT7keh0Fe5eF/u3wcyepGP4IRUCP5HvcUochwT0WGfnX1B3LzWzH5hZnrun2yRe6XJMepROxySBaWcCPS5RG9JZD0w3sylmlgPcSMf0EKkkkekqhpnZiD9/DlwNxL1iIQSJfI9LgFtjVyBcBBz68zBWiulxX8xsfGz6EMxsAR2/Uwf6vdLkpcsx6VG6HJNYjT1NOxPscQn7neoA3/G+jo7/DY8D9cCa2OsTgdIu73pvp+Pqi/vDrjvOfoyh42EyO2L/ju66H3RcNVIe+6hItf2I9z0G7gbujn1uwMOx9Vvo5qqqVPhIYF/ujR2DcmAdcHHYNXezH78E9gInYr8nd6bxMelpX9LlmFxCx/DMZmBT7GNpXx4XTa0gIhIRURvSERGJLAW+iEhEKPBFRCJCgS8iEhEKfBGRiFDgi4hEhAJfRCQi/h/W6eoNOYl28gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "def quad_wave(x,c):     #在c处产生抛物线\n",
    "     if x>=c:\n",
    "          r=x**2\n",
    "     else:\n",
    "          r=0.0\n",
    "     return r\n",
    "\n",
    "x=np.linspace(-1,2,1000)\n",
    "y=np.array([quad_wave(t,0.0) for t in x])\n",
    "plt.ylim(-0.2,1.2)\n",
    "plt.plot(x,y)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a1fedf2e",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "celltoolbar": "无",
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
